<?php

 class __module_menu {

	var $urls   = array(		// This list pages in module. array( "default" => "default_page_name", "namepage" => "nameclass" )
					"block_show"	  => "block_menu",
					"block_submenu"	  => "block_submenu",
					"block_bottommenu"	  => "block_bottommenu",
					"block_copyrights"	  => "block_copyrights",
					"block_topmenu"	  	  => "block_topmenu"
					
					
 			      );

	function block_menu($args=array()) {
		
		
		__driver_display::si() -> assign("menu", ginst('menu_api', 'module', false)->getMenu());
		
		return array(
			'body'=>__driver_display::si()->fetch(array('block_show.tpl', new KT_start_moduleName('menu'))),
			'title'  => $GLOBALS['languages']['menu']['block_title']
		);
		
	}

	function block_submenu()
	{
		return	__driver_display::si()->fetch(array('submenu_show.tpl', new KT_start_moduleName('menu')));

	}

	function block_bottommenu()
	{
		return __driver_display::si()->fetch(array('bottommenu_show.tpl', new KT_start_moduleName('menu')));
	}

	function block_copyrights()
	{
		if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 7") != false)
		{
			$browser=1;		
		} 
		else if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 6") != false)
		{
			$browser=1;		
		}
		else if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 8") != false)
		{
			$browser=1;		
		}else $browser = 0;
		
		__driver_display::si() -> assign("browser", $browser);
		return $this->block_bottommenu().__driver_display::si()->fetch(array('copyrights_show.tpl', new KT_start_moduleName('menu')));
	}

	function block_topmenu()
	{
				
		if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 7") != false)
		{
			$browser=1;		
		} 
		else if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 6") != false)
		{
			$browser=1;		
		} 
		else if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE 8") != false)
		{
			$browser=1;		
		} else $browser = 0;
		
		__driver_display::si() -> assign("browser", $browser);
		
		return	__driver_display::si()->fetch(array('topmenu_show.tpl', new KT_start_moduleName('menu')));

	}
	
	
	

 }
?>
